import request from '@/utils/request';

/**
 * 分页查询发放的物资
 * @param {*} current 
 * @param {*} size 
 * @param {*} inStockVO 
 * @returns 
 */
export function findOutStockList(current,size,inStockVO){
    return request({
        url: '/biz/outStock/findOutStockList',
        method: 'post',
        /*localhost:8080/user?id=  方式传值*/
        params: {
          current,
          size
        },
        /*json数据传值*/
        data: inStockVO
    })
}

/**
 * 删除入库清单
 * @param {*} id 
 * @param {*} outNum 
 */
export function del(id,outNum){
    return request({
        url: '/biz/outStock/delOutStock',
        method: 'delete',
        params: {
        id,
        outNum
        }
    })
}

/**
 * 恢复入库清单
 * @param {*} id 
 * @returns 
 */
export function back(id){
    return request({
        url: '/biz/outStock/backOutStock',
        method: 'post',
        params: {
        id
        }
    })
}

/**
 * 移至回收站
 * @param {*} id 
 */
export function remove(id){
    return request({
        url: '/biz/outStock/removeOutStock',
        method: 'post',
        params: {
            id
        }
    })
}

/**
 * 入库审核通过
 * @param {*} id 
 * @param {*} outNum 
 */
export function publish(id,outNum){
    return request({
        url: '/biz/outStock/publishOutStock',
        method: 'post',
        params: {
        id,
        outNum
        }
    })
}

/**
 * 添加入库申请
 * @param {} intoStockVO 
 */
export function addOutStock(intoStockVO){
    return request({
        url: '/biz/outStock/addOutStock',
        method: 'post',
        data: intoStockVO
    })
}

/**
 * 出库详情
 * @param {*} outNum 
 * @param {*} consumerId 
 * @param {*} current 
 */
export function detail(outNum,consumerId,current){
    return request({
        url: '/biz/outStock/detail',
        method: 'post',
        params: {
        outNum,
        consumerId,
        current,
        }
    })
}